/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package podologia.beansDB;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Hernan
 */
@Embeddable
public class AntepatoxpacientePK implements Serializable {
    @Column(name = "idPaciente", nullable = false)
    private int idPaciente;
    @Column(name = "idAntePato", nullable = false)
    private int idAntePato;

    public AntepatoxpacientePK() {
    }

    public AntepatoxpacientePK(int idPaciente, int idAntePato) {
        this.idPaciente = idPaciente;
        this.idAntePato = idAntePato;
    }

    public int getIdPaciente() {
        return idPaciente;
    }

    public void setIdPaciente(int idPaciente) {
        this.idPaciente = idPaciente;
    }

    public int getIdAntePato() {
        return idAntePato;
    }

    public void setIdAntePato(int idAntePato) {
        this.idAntePato = idAntePato;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idPaciente;
        hash += (int) idAntePato;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AntepatoxpacientePK)) {
            return false;
        }
        AntepatoxpacientePK other = (AntepatoxpacientePK) object;
        if (this.idPaciente != other.idPaciente) {
            return false;
        }
        if (this.idAntePato != other.idAntePato) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "podologia.beansDB.AntepatoxpacientePK[idPaciente=" + idPaciente + ", idAntePato=" + idAntePato + "]";
    }

}
